Inferring Scope through Syntactic Sugar (Extended Version)

نویسندگان

  • JUSTIN POMBRIO
  • SHRIRAM KRISHNAMURTHI
  • Justin Pombrio
  • Shriram Krishnamurthi
چکیده

Many languages use syntactic sugar to define parts of their surface language in terms of a smaller core. Thus some properties of the surface language, like its scoping rules, are not immediately evident. Nevertheless, ides, refactorers, and other tools that traffic in source code depend on these rules to present information to users and to soundly perform their operations. In this paper, we show how to lift scoping rules defined on a core language to rules on the surface, a process of scope inference. In the process we introduce a new representation of binding structure—scope as a preorder—and present a theoretical advance: proving that a desugaring system preserves α-equivalence even though scoping rules have been provided only for the core language. We have also implemented the system presented in this paper.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Resugaring: Lifting Languages through Syntactic Sugar

Syntactic sugar is pervasive in language technology. Programmers use it to shrink the size of a core language; to define domain-specific languages; and even to extend their language. Unfortunately, when syntactic sugar is eliminated by transformation, it obscures the relationship between the user’s source program and the program being evaluated. First, it obscures the evaluation steps the progr...

متن کامل

The Effect of Reducing Lexical and Syntactic Complexity of Texts on Reading Comprehension

The present study investigated the effect of different types of text simplification (i.e., reducing the lexical and syntactic complexity of texts) on reading comprehension of English as a Foreign Language learners (EFL). Sixty female intermediate EFL learners from three intact classes in Tabarestan Language Institute in Tehran participated in the study. The intact classes were assigned to three...

متن کامل

Inferring the Scope of Negation and Speculation Via Dependency Analysis

In the last few years negation and speculation scope classification systems have been developed successfully, most of them using machine–learning approaches. In this paper we present a competitive system that finds the scope of negation and speculation in sentences for English by means of syntactic dependency analysis without using machine–learning. A greedy algorithm first detects the cues (le...

متن کامل

Modeling Thermo-electro-mechanical Beams in Sugar

INTRODUCTION Qconv SUGAR is a simulation package for 3D MEMS devices that utilizes nodal analysis techniques [1]. It has been shown that nodal analysis is significantly faster than other simulation techniques and can be just as accurate. The latest version of SUGAR (v2.0) includes various models for 2D and 3D beams, electrical beams, and gap closing actuators [2]. In addition, SUGAR is easily e...

متن کامل

Procedural Dynamic Semantics , Verb - Phrase Ellipsis , and Presupposition by

In this paper, we study Verb-phrase Ellipsis (VPE) and show its relationship to presupposition and its failure. In doing so, we use a novel representation of VPE by means of a dynamic semantics approach, using an extended version of Dynamic Predicate Logic which includes procedures, scope rules and functions. We focus on the representation of the strict/sloppy ambiguity in connection with ellip...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017